<template>
  <span class="undo" v-if="obj.res === ''">{{ index + 1 }}: 未完成</span>
  <span class="right" v-else-if="obj.rigth + obj.left === obj.res"
    >{{ index + 1 }}: 正确</span
  >
  <span class="error" v-else>{{ index + 1 }}: 错误</span>
</template>

<script>
export default {
  props: {
    obj: Object,
    index: Number,
  },
};
</script>

<style scoped>
.right {
  color: green;
}
.error {
  color: red;
}
.undo {
  color: #ccc;
}
</style>
